package ${domain}.module.wsys.req;

import org.hibernate.validator.constraints.Length;
import ${domain}.frame.base.BaseRequest;
import ${domain}.frame.validation.Select;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * UserCreateRequest - 用户新增
 *
 * @author wangbing
 * @version 0.0.1
 * @since 2017-01-01
 */
public class UserCreateRequest extends BaseRequest {

    /**
     * 用户账户
     */
    @NotBlank(message = "[userName]用户账户不能为空")
    @Length(min = 0, max = 100, message = "[userName]用户账户长度不合法(0-100)")
    private String userName;

    /**
     * 用户代码
     */
    @Length(min = 0, max = 50, message = "[userCode]用户代码长度不合法(0-50)")
    private String userCode;

    /**
     * 用户别名
     */
    @NotBlank(message = "[userAlias]用户别名不能为空")
    @Length(min = 0, max = 50, message = "[userAlias]用户别名长度不合法(0-50)")
    private String userAlias;

    /**
     * 用户密码
     */
    @NotBlank(message = "[userPwd]用户密码不能为空")
    @Length(min = 0, max = 50, message = "[userPwd]用户密码长度不合法(0-50)")
    private String userPwd;

    /**
     * 用户状态.
     * 0:无效
     * 1:有效
     * 2:初始密码
     */
    @NotNull(message = "[userStatus]用户状态不能为NULL")
    @Select({"0", "1", "2"})
    private String userStatus;

    /**
     * 部门代码
     */
    private String deptCode;

    @NotEmpty(message = "[roleCodeList]请至少选择一个角色")
    private List<String> roleCodeList;

    public String getUserName() {
        return this.userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getUserCode() {
        return this.userCode;
    }

    public void setUserCode(String userCode) {
        this.userCode = userCode;
    }

    public String getUserAlias() {
        return this.userAlias;
    }

    public void setUserAlias(String userAlias) {
        this.userAlias = userAlias;
    }

    public String getUserPwd() {
        return this.userPwd;
    }

    public void setUserPwd(String userPwd) {
        this.userPwd = userPwd;
    }

    public String getUserStatus() {
        return this.userStatus;
    }

    public void setUserStatus(String userStatus) {
        this.userStatus = userStatus;
    }

    public String getDeptCode() {
        return this.deptCode;
    }

    public void setDeptCode(String deptCode) {
        this.deptCode = deptCode;
    }

    public List<String> getRoleCodeList() {
        return roleCodeList;
    }

    public void setRoleCodeList(List<String> roleCodeList) {
        this.roleCodeList = roleCodeList;
    }
}
